
<html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Yong bus- 永州公交</title>
    <meta http-equiv="cleartype" content="on">
    <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=no,initial-scale =1">
    <meta name="renderer" content=webkit>
    <meta name="force-rendering" content="webkit">
    <meta name="HandheldFriendly" content="True">
    <meta name="MobileOptimized" content=" 320">
    <meta name="screen-orientation" content="portrait">
    <meta name="x5-orientation" content="portrait">
    <meta name="format-detection" content=" telephone=no; address=no;email =no;">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="white">
    <meta name="mobile-web-app-capable" content="yes">
	<script src="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script>
	<script src="https://cdn.jsdelivr.net/npm/meting@2.0.1/dist/Meting.min.js"></script>
	<link rel="stylesheet" type="text/css" href="https://ccccc.cyou/css/General.css">
	<link rel="icon" href="https://gitee.com/sea03745a/sea03745a/raw/master/in.ico" type="image/x-icon">
	<link rel="shortcut icon" href="https://gitee.com/sea03745a/sea03745a/raw/master/in.ico" type="image/x-icon">
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css">
</head>
<div style="font-family: '华文中宋';">

    <meta name="x5-fullscreen" content="false">
    <meta name="browsermode" content="application">
    <meta name="x5-page-mode" content="app">

    <link href="css/mui.min.css" rel="stylesheet" />
    <link href="fonts/iconfont.css" rel="stylesheet" />
    <link href="css/common.css" rel="stylesheet" />
    <link href="css/bns.css" rel="stylesheet" />
    <link rel="stylesheet" href="icon/iconfont.css">
    <script src="icon/iconfont.js"></script>
    <link rel="stylesheet" type="text/css" href="css/mdialog.css">
    <style>
        ul#drop {
            list-style: none;
            margin: 0;
            padding: 0;
            height: 290px;
            border: 1px solid #000000;
            overflow: scroll;
            background: #ffffff;
            z-index: 10;
        }

        ul#drop li {
            margin: 0;
            padding: 10px;
            font-size: 20px;
            text-align: left;
            border-bottom: 1px solid #ffffff;
        }

        ul#drop li:hover {
            background-color: darkgrey;
        }
    </style>
    <script src="js/jquery-1.7.min.js"></script>
    <script src="js/components.js"></script>
    <!-- <script src="fw.js"></script> -->
</head>

<body>
    <!--index-->
    <div id="page-index" class="page-view">
        <div class="mui-content">
            <div class="beijing"><img src="https://cdn.jsdelivr.net/gh/dahisea/Auto_up_tester@latest/2021-05/5e676bcc5643ff1df01a9426c59d13b0.jpg" alt="" class="picture"></div>
            <div class="shouye"><img src="https://i.loli.net/2021/06/06/4kGrvZSRMj1WCV9.jpg" alt="" class="picture"></div>
            <div class="gz-search">
                <div class="mui-input-row mui-search " id="search">
                    <input id="searchLine" type="text" class="mui-input-clear" placeholder="请选择路线 or 输入线路">
                    <img class="searchimg" src="https://i.loli.net/2021/06/06/qmPK8AQOIz6cdMT.png" alt="">
                </div>
            </div>
            <div class="history-info">
                <div class="lishi">
                    <h3>历史查询记录：</h3>
                </div>
                <div class="jilu"></div>
            </div>
            <div title="线路" id="myssl_seal" onclick="window.open('./view/transfer-search.html','查询','height=800,width=470,top=0,right=0,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no')" style="text-align: center"><img src="https://i.loli.net/2021/06/06/uEfBtrjcSyPCa8v.png" alt="线路" style="width: 130px;height: auto; cursor: pointer"></div>
            <div class="functional-div">
                <img src="https://i.loli.net/2021/06/06/uEfBtrjcSyPCa8v.png" alt="" style="width:0">
            </div>

        </div>
        <div id="iframe-box">
            <iframe name="transfer" class="iframe2" src="./view/transfer-search.html" frameboder="0" scrolling="no"
                border="0" id="transfersearch"></iframe>
        </div>
    </div>
    
</div>
</body>

<script src="js/api.js"></script>
<script src="js/zepto.js"></script>
<script src="js/mui.min.js"></script>
<script src="js/map.js"></script>
<script src="js/boot.js"></script>

<script src="js/zepto.min.js"></script>
<!-- <script src="js/mdialog.js"></script> -->



<script>
    $(document).ready(function () {
        wbComMethod.loadMask.show();
    });
</script>


<script type="text/javascript">
    function setAddressResult(longitude, latitude, type, address) {
        window.frames['transfer'].setAddress(type, address);
    }
</script>


<script type="text/javascript">
    var webApp = {
        name: [],
        id: [],
        maskInit: function () {
            //widget.markView.show(1,'');
        },
        mapInit: function () {
            mapTool.onImport(function (ctx) {
                wbComMethod.loadMask.hide();
                // ctx.onInitLineSerach({
                //     city: '永州'
                // });

            })
        },
        methodInit: {
            onOpenSiteDetail: function (name, id) {
                wbComMethod.openNewWin({
                    url: staticConfig.pageUrl.lineSearchDetail,
                    params: 'name=' + name,
                    paramid: 'routeid=' + id
                })
            }
        },
        eventInit: function () {
            //localStorage.setItem('line', " [{ 'name': '1', 'id': '12' }]");
            var sname = document.getElementById('transfersearch').contentWindow.document.getElementById(
                'sname');
            var ename = document.getElementById('transfersearch').contentWindow.document.getElementById(
                'ename');
            $('#page-index .functional-box .functional-option .transfer-search').on('click', function () {
                wbComMethod.openNewWin({
                    url: staticConfig.pageUrl.transferSearch,
                })
            });
            $("#page-index").on('click', '.clear-all-history', function () {
                localStorage.removeItem('line');
                $("#page-index #searchLine").val('');
                webApp.loadInit();
            });
            $("#page-index").on('click', '.mui-table-view .history-list', function () {
                var route = $(this).attr("data-name");
                var router = route.split("-")
                var name = router[0];
                var id = router[1];
                var lines = eval('(' + localStorage.getItem('line') + ')');
                var arr = {
                    "name": name,
                    "id": id
                };
                objContrast(arr, lines);

                function objContrast(arr, lines) {
                    for (var i = 0; i < lines.length; i++) {
                        if (arr.id == lines[i].id) {
                            lines.splice(i, 1);
                            return false
                        };
                    }
                };
                localStorage.removeItem('line');
                localStorage.setItem('line', JSON.stringify(lines));
                webApp.methodInit.onOpenSiteDetail(name, id);
            });
        },
        showInit: function () {
            var params = {
                pageindex: 1,
                pagesize: 100,
            };
            frDataRequest.ajaxRequest({
                url: webApi.getUrl(webApi.monitor.rotelist),
                param: params,
                success: function (jd) {
                    var data = jd.data.dataList;
                    //console.log(data);
                    //var name = [];
                    var a = "停止服务301";
                    var b = "停止服务302";
                    var c = "停止服务";
                    var d = "开发测试";
                    var e = "特殊线路（一公司）";
                    var f = "特殊线路（二公司）";
                    var g = "经开区免费专线"
                    for (var i = 0; i < data.length; i++) {
                        if ((data[i].name).toString() != a.toString()) {
                            if ((data[i].name).toString() != b.toString()) {
                                if ((data[i].name).toString() != c.toString()) {
                                    if ((data[i].name).toString() != d.toString()) {
                                        if ((data[i].name).toString() != e.toString()) {
                                            if ((data[i].name).toString() != f.toString()) {
                                                if ((data[i].name).toString() != g.toString()) {
                                                    webApp.name.push(data[i].name + "-" + data[i]
                                                        .id);
                                                    //webApp.id.push(data[i].id);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                    //console.log(webApp.name);
                }
            });
        },
        loadInit: function () {
            $("#page-index #searchLine").val('');

            var html = ''
            // console.log(localStorage.getItem('line'));
            if (localStorage.getItem('line')) {
                html += '<ul class="mui-table-view gz-app-bg-f2 history-lists">';
                var exitSite = eval('(' + localStorage.getItem('line') + ')');
                //console.log(exitSite);
                for (var j = 0; j < exitSite.length; j++) {
                    html += '<li class="history-list" data-name="' + exitSite[j].name + '-' + exitSite[j].id +
                        '">' +
                        '<span>' + exitSite[j].name + '</span>' +
                        '</li>'
                }
                html += '</ul>' +
                    '<div>' +
                    '<div class="clear-all-history">' +
                    '<h6>清空</h6>' +
                    '</div></div>';
            }
            $("#page-index .history-info .jilu").html(html);
        },

        showColor: function () {
            $("#nav-box .bot-nav .li1").addClass("color");
        },

        searchInit: function (evg) {
            // 获取div
            var search = document.getElementById("search");
            // 获取输入框元素
            var searchText = document.getElementById("searchLine");

            // 添加获取焦点事件
            searchText.onfocus = function () {
                var drop = document.getElementById("drop");
                if (!drop) {
                    // 初始下拉列表
                    var originalUl = document.createElement("ul");
                    originalUl.id = "drop";
                    webApp.name.forEach(function (element) {
                        // 创建li
                        //console.log(element);
                        var li = document.createElement("li");
                        var img = document.createElement("img");
                        img.setAttribute("id", "newImg");
                        img.src = "https://i.loli.net/2021/06/06/uEfBtrjcSyPCa8v.png";
                        var ele = element.split("-");
                        li.innerHTML = ele[0];
                        li.title = ele[0];
                        li.id = ele[1];
                        li.appendChild(img);
                        // 添加点击事件
                        li.onclick = function () {
                            var html = this.innerHTML
                            var htmls = html.split("<");
                            searchText.value = htmls[0];
                            searchText.title = this.id;
                            var name = $("#searchLine").val();
                            var id = $("#searchLine").attr("title");
                            // var lines = eval('(' + localStorage.getItem('line') + ')');
                            // var arr = { "name": name, "id": id };
                            // objContrast(arr, lines);
                            // function objContrast(arr, lines) {
                            //     if (lines != null) {
                            //         for (var i = 0; i < lines.length; i++) {
                            //             if (arr.id == lines[i].id) {
                            //                 lines.splice(i, 1);
                            //                 return false
                            //             };
                            //         }
                            //     }
                            // };
                            // localStorage.removeItem('line');
                            // localStorage.setItem('line', JSON.stringify(lines));
                            webApp.methodInit.onOpenSiteDetail(name, id);
                        };
                        originalUl.appendChild(li);
                    });
                    search.appendChild(originalUl);
                }

            };
            // 添加键盘事件
            searchText.onkeyup = function () {
                // 先删除
                var drop = document.getElementById("drop");
                search.removeChild(drop);
                // 创建ul
                var ul = document.createElement("ul");
                ul.id = "drop";
                // 添加ul
                search.appendChild(ul);
                // 遍历数组匹配数据
                webApp.name.forEach(function (element) {
                    var name = element.split('-');
                    if (name[0].search(searchText.value) != -1) {
                        // 创建li
                        var li = document.createElement("li");
                        var img = document.createElement("img");
                        img.setAttribute("id", "newImg");
                        img.src = "https://i.loli.net/2021/06/06/uEfBtrjcSyPCa8v.png";
                        var ele = element.split("-");
                        li.innerHTML = ele[0];
                        li.title = ele[0];
                        li.id = ele[1];
                        li.appendChild(img);
                        // 添加点击事件
                        li.onclick = function () {
                            var html = this.innerHTML
                            var htmls = html.split("<");
                            searchText.value = htmls[0];
                            searchText.title = this.id;
                            var name = $("#searchLine").val();
                            var id = $("#searchLine").attr("title");
                            // var lines = eval('(' + localStorage.getItem('line') + ')');
                            // var arr = { "name": name, "id": id };
                            // objContrast(arr, lines);
                            // function objContrast(arr, lines) {
                            //     if (lines.length == null) {
                            //         for (var i = 0; i < lines.length; i++) {
                            //             if (arr.id == lines[i].id) {
                            //                 lines.splice(i, 1);
                            //                 return false
                            //             };
                            //         }
                            //     }
                            // };
                            // localStorage.removeItem('line');
                            // localStorage.setItem('line', JSON.stringify(lines));
                            webApp.methodInit.onOpenSiteDetail(name, id);
                        };
                        ul.appendChild(li);
                    }
                });
            };

            if (search.addEventListener) {
                search.addEventListener("click", function (evg) {
                    evg.stopPropagation();
                })
            } else if (search.attachEvent) {
                search.attachEvent("click", function (evg) {
                    evg.cancelBubble = true;
                })
            }
            // 添加文档点击事件
            document.onclick = function () {
                try {
                    var drop = document.getElementById("drop");
                    search.removeChild(drop);
                } catch (err) {
                    err.pageInit;
                }
            };
        },
        pageInit: function () {
            this.maskInit();
            this.eventInit();
            this.showInit();
            this.loadInit();
            this.searchInit();
        },
        downloadFW: function () {
            frDataRequest.ajaxRequest({
                url: webApi.getUrl(webApi.monitor.traffic),
                param: {},
                success: function (jd) {}
            });
        }
    };

    window.onload = function () {
        webApp.downloadFW();
        webApp.pageInit();
        wbComMethod.loadMask.hide();
    };
</script>
<div id="music">
<meting-js 
	server="netease" 
	type="playlist" 
	id="5399139411"
	fixed="ture" 
	autoplay="false"
	loop="all"
	order="random"
	preload="auto"
	list-folded="false"
	list-max-height="500px"
	lrc-type="1">
</meting-js>
<div id="cc-myssl-id" style="position: fixed;right: 0;bottom: 0;width: 35px;height: 35px;z-index: 99;">
    <a href="./view/transfer-search.html"><img src="https://i.loli.net/2021/06/06/qmPK8AQOIz6cdMT.png" alt="" style="width:100%;height:100%"></a>
</div>
</div>
</html>
